package com.atguigu.spring.controller;

import com.atguigu.spring.service.BookService;
import com.atguigu.spring.service.CheckOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author 林允
 * @version 1.0
 * @description: TODO
 * @date 2023/5/10 9:43
 */
@Controller
public class BookController {

    @Autowired
    private BookService bookService;
    @Autowired
    private CheckOutService checkOutService;

    public void buyBook(Integer userId, Integer bookId){
        bookService.buyBook(userId, bookId);
    }

    public void checkOut(Integer userId, Integer[] bookId){
        checkOutService.checkOut(userId, bookId);
    }

}
